package com.ask.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class TestTask {

    //@Scheduled(fixedRate = 5000)
    //@Async("orderTaskExecutor")
    public void task1() throws InterruptedException {
        System.out.println("Task 1 executed by " + Thread.currentThread().getName());
        Thread.sleep(5000);
    }

    //@Scheduled(fixedRate = 1000)
    //@Async("orderTaskExecutor")
    public void task2() {
        System.out.println("Task 1 executed by " + Thread.currentThread().getName());
    }
}
